package itsos.dao;

import org.springframework.orm.ibatis.support.*;
import itsos.model.*;

import java.util.*;

public class MainIssueDao extends SqlMapClientDaoSupport {
	
	public void insertMainIssue(MainIssue mainIssue)
	{
		getSqlMapClientTemplate().insert("MainIssue.insertMainIssue", mainIssue);
	}
	
	public void updateMainIssue(MainIssue mainIssue)
	{
		getSqlMapClientTemplate().update("updateMainIssue", mainIssue);
	}
	
	public MainIssue viewMainIssue(long repositoryID)
	{
		return (MainIssue) getSqlMapClientTemplate().queryForObject("MainIssue.viewMainIssue", repositoryID);
	}
	
	public MainIssue getMainIssue(long repositoryID)
	{
		return (MainIssue) getSqlMapClientTemplate().queryForObject("MainIssue.getMainIssue", repositoryID);
	}
	
	public List selectAdmin()
	{
		return (List)getSqlMapClientTemplate().queryForList("MainIssue.selectAdmin");
	}
	
	public void adminUpdate(MainIssue mainIssue)
	{
		getSqlMapClientTemplate().update("MainIssue.adminUpdate", mainIssue);
	}
	
	public MainIssue getAdminMainIssue(MainIssue mainIssue)
	{
		return (MainIssue)getSqlMapClientTemplate().queryForObject("MainIssue.getAdminMainIssue", mainIssue);
	}
	
	public void contentUpdate(MainIssue mainIssue)
	{
		getSqlMapClientTemplate().update("MainIssue.contentUpdate", mainIssue);
	}

}
